<%--
  Created by IntelliJ IDEA.
  User: 86150
  Date: 2020/9/23
  Time: 19:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <!--=== Favicon ===-->
    <link rel="shortcut icon" href="${pageContext.request.contextPath}/static/assets/img/favicon.ico" type="image/x-icon" />

    <!-- Google fonts include -->
    <link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700,900%7CYesteryear" rel="stylesheet">

    <!-- All Vendor & plugins CSS include -->
    <link href="${pageContext.request.contextPath}/static/assets/css/vendor.css" rel="stylesheet">
    <!-- Main Style CSS -->
    <link href="${pageContext.request.contextPath}/static/assets/css/style.css" rel="stylesheet">
</head>

<!-- main menu area start -->
<div class="col-lg-6 position-static">
    <div class="main-menu-area">
        <div class="main-menu">
            <!-- main menu navbar start -->
            <nav class="desktop-menu">
                <ul>
                    <li><a href="${pageContext.request.contextPath}/flower/indexInit">主页</a></li>
                    <li><a href="${pageContext.request.contextPath}/flower/shopInit">花海</a></li>
                    <li><a href="${pageContext.request.contextPath}/flower/productInit">花卉信息</a></li>
                </ul>
            </nav>
            <!-- main menu navbar end -->
        </div>
    </div>
</div>
<!-- main menu area end -->


<body>
<div class="row">
    <div class="col-12">
        <div class="section-title text-center">
            <br> <br>
            <h2>心愿单</h2>
            <p>花海花卉</p>
        </div>
    </div>
</div>
<section class="banner-statistics-right"><section>
    <div class="container">
        <div class="row">
            <br>
            <br>
            <a href="${pageContext.request.contextPath}/user/userLoginInit"> <h4 style="color: blue"> ${msg}</h4></a>


            <c:forEach items="${fList}" var="f">
<!-- product single item start -->
<div class="product-item">
<figure class="product-thumb">
<a href="product-details.html">
<img class="pri-img" src="${pageContext.request.contextPath}/static/assets/img/product/product-11.jpg" alt="product">
<img class="sec-img" src="${pageContext.request.contextPath}/static/assets/img/product/product-8.jpg" alt="product">
</a>
<div class="product-badge">

<div class="product-label discount">
<span>${f.discount}</span>
</div>

</div>
<div class="button-group">
<a href="#" data-toggle="tooltip" data-placement="left" title="移除"><i class="minicart-remove"><button class="minicart-remove"onclick="deleteCart(${f.id})"><i class="lnr lnr-cross"></i></button></i></a>
<a href="#" data-toggle="tooltip" data-placement="left" title="添加到购物车"><i class="lnr lnr-cart" onclick="addCart(${f.id})"></i></a>
</div>
</figure>
<div class="product-caption">
<p class="product-name">
<a href="product-details.html">${f.fname}</a>
</p>
<div class="price-box">
<span class="price-regular">${f.fprice}</span>

</div>
</div>
</div>
<!-- product single item end -->
            </c:forEach>
</div>
</div>
</div>
</div>
</section>
<!-- trending product area end -->

<!-- Instagram Feed Area Start -->
<div class="instagram-feed-area">
    <div class="instagram-feed-thumb">
        <div id="instafeed" class="instagram-carousel" data-userid="6666969077" data-accesstoken="6666969077.1677ed0.d325f406d94c4dfab939137c5c2cc6c2">
        </div>
    </div>
</div>
<!-- Instagram Feed Area End -->

</section></div></div>
<!-- All vendor & plugins & active js include here -->
<!--All Vendor Js -->
<script src="${pageContext.request.contextPath}/static/assets/js/vendor.js"></script>
<!-- Active Js -->
<script src="${pageContext.request.contextPath}/static/assets/js/active.js"></script>
<script src="${pageContext.request.contextPath}/static/js/jquery-1.8.2.min.js"></script>
<script>


    function deleteCart(id) {
        $.post("${pageContext.request.contextPath}/flower/delwish",{"id":id},function (r){

            location.href ="${pageContext.request.contextPath}/flower/wishListInit"
        })


    }

    function addCart(fid) {
        var fid = fid
        var count = 1

        $.post("${pageContext.request.contextPath}/flower/addCart",{"fid":fid,"count":count},function (r){
            alert(r.msg);
            deleteCart(fid);
            location.href ="${pageContext.request.contextPath}/flower/wishListInit"
        })


    }

</script>
</body>
</html>
